<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE TypeOperators #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Control.Monad.Fix</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) Andy Gill 2001,</span><span>
</span><span id="line-9"></span><span class="hs-comment">--                (c) Oregon Graduate Institute of Science and Technology, 2002</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Monadic fixpoints.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- For a detailed discussion, see Levent Erkok's thesis,</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- /Value Recursion in Monadic Computations/, Oregon Graduate Institute, 2002.</span><span>
</span><span id="line-19"></span><span class="hs-comment">--</span><span>
</span><span id="line-20"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Control.Monad.Fix</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier">MonadFix</span></a></span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier">mfix</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="Data.Function.html#fix"><span class="hs-identifier">fix</span></a></span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Either.html"><span class="hs-identifier">Data.Either</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Function.html"><span class="hs-identifier">Data.Function</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Function.html#fix"><span class="hs-identifier">fix</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Monoid.html"><span class="hs-identifier">Data.Monoid</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier">Dual</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier">Sum</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier">Product</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Monoid.html#First"><span class="hs-identifier">First</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Monoid.html#Last"><span class="hs-identifier">Last</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier">Alt</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Monoid.html#Ap"><span class="hs-identifier">Ap</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Ord.html"><span class="hs-identifier">Data.Ord</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Data.Ord.html#Down"><span class="hs-identifier">Down</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier">Monad</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#NonEmpty"><span class="hs-identifier">NonEmpty</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier">errorWithoutStackTrace</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Base.html#."><span class="hs-operator">(.)</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Generics.html"><span class="hs-identifier">GHC.Generics</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.List.html#head"><span class="hs-identifier">head</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.List.html#tail"><span class="hs-identifier">tail</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#"><span class="hs-identifier">GHC.Tuple</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier">Solo</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Monad.ST.Imp.html"><span class="hs-identifier">Control.Monad.ST.Imp</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="System.IO.html"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-comment">-- | Monads having fixed points with a \'knot-tying\' semantics.</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- Instances of 'MonadFix' should satisfy the following laws:</span><span>
</span><span id="line-42"></span><span class="hs-comment">--</span><span>
</span><span id="line-43"></span><span class="hs-comment">-- [Purity]</span><span>
</span><span id="line-44"></span><span class="hs-comment">--      @'mfix' ('Control.Monad.return' . h)  =  'Control.Monad.return' ('fix' h)@</span><span>
</span><span id="line-45"></span><span class="hs-comment">--</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- [Left shrinking (or Tightening)]</span><span>
</span><span id="line-47"></span><span class="hs-comment">--      @'mfix' (\\x -&gt; a &gt;&gt;= \\y -&gt; f x y)  =  a &gt;&gt;= \\y -&gt; 'mfix' (\\x -&gt; f x y)@</span><span>
</span><span id="line-48"></span><span class="hs-comment">--</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- [Sliding]</span><span>
</span><span id="line-50"></span><span class="hs-comment">--      @'mfix' ('Control.Monad.liftM' h . f)  =  'Control.Monad.liftM' h ('mfix' (f . h))@,</span><span>
</span><span id="line-51"></span><span class="hs-comment">--      for strict @h@.</span><span>
</span><span id="line-52"></span><span class="hs-comment">--</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- [Nesting]</span><span>
</span><span id="line-54"></span><span class="hs-comment">--      @'mfix' (\\x -&gt; 'mfix' (\\y -&gt; f x y))  =  'mfix' (\\x -&gt; f x x)@</span><span>
</span><span id="line-55"></span><span class="hs-comment">--</span><span>
</span><span id="line-56"></span><span class="hs-comment">-- This class is used in the translation of the recursive @do@ notation</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- supported by GHC and Hugs.</span><span>
</span><span id="line-58"></span><span class="hs-keyword">class</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518989"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="MonadFix"><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-var">MonadFix</span></a></span></span><span> </span><span id="local-6989586621679518989"><span class="annot"><a href="#local-6989586621679518989"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-59"></span><span>        </span><span class="hs-comment">-- | The fixed point of a monadic computation.</span><span>
</span><span id="line-60"></span><span>        </span><span class="hs-comment">-- @'mfix' f@ executes the action @f@ only once, with the eventual</span><span>
</span><span id="line-61"></span><span>        </span><span class="hs-comment">-- output fed back as the input.  Hence @f@ should not be strict,</span><span>
</span><span id="line-62"></span><span>        </span><span class="hs-comment">-- for then @'mfix' f@ would diverge.</span><span>
</span><span id="line-63"></span><span>        </span><span id="local-6989586621679518988"><span id="mfix"><span class="annot"><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-type">mfix</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679518988"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679518989"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518988"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679518989"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518988"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- Instances of MonadFix for Prelude monads</span><span>
</span><span id="line-66"></span><span>
</span><span id="line-67"></span><span class="hs-comment">-- | @since 4.15</span><span>
</span><span id="line-68"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-type">Solo</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-69"></span><span>    </span><span id="local-6989586621679518844"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Solo a) -&gt; Solo a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518843"><span class="annot"><span class="annottext">a -&gt; Solo a
</span><a href="#local-6989586621679518843"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679518842"><span class="annot"><span class="annottext">a :: Solo a
</span><a href="#local-6989586621679518842"><span class="hs-identifier hs-var hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Solo a
</span><a href="#local-6989586621679518843"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Solo a -&gt; a
forall {a}. Solo a -&gt; a
</span><a href="#local-6989586621679518841"><span class="hs-identifier hs-var">unSolo</span></a></span><span> </span><span class="annot"><span class="annottext">Solo a
</span><a href="#local-6989586621679518842"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Solo a
</span><a href="#local-6989586621679518842"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-70"></span><span>             </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679518841"><span class="annot"><span class="annottext">unSolo :: Solo a -&gt; a
</span><a href="#local-6989586621679518841"><span class="hs-identifier hs-var hs-var">unSolo</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#Solo"><span class="hs-identifier hs-type">Solo</span></a></span><span> </span><span id="local-6989586621679518840"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518840"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518840"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-73"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-74"></span><span>    </span><span id="local-6989586621679518834"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Maybe a) -&gt; Maybe a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518833"><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621679518833"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679518832"><span class="annot"><span class="annottext">a :: Maybe a
</span><a href="#local-6989586621679518832"><span class="hs-identifier hs-var hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
</span><a href="#local-6989586621679518833"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a -&gt; a
forall {a}. Maybe a -&gt; a
</span><a href="#local-6989586621679518831"><span class="hs-identifier hs-var">unJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679518832"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621679518832"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-75"></span><span>             </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679518831"><span class="annot"><span class="annottext">unJust :: Maybe a -&gt; a
</span><a href="#local-6989586621679518831"><span class="hs-identifier hs-var hs-var">unJust</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679518830"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518830"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518830"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-76"></span><span>                   </span><span class="annot"><a href="#local-6989586621679518831"><span class="hs-identifier hs-var">unJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; a
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;mfix Maybe: Nothing&quot;</span></span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-79"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-80"></span><span>    </span><span id="local-6989586621679518823"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; [a]) -&gt; [a]
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518822"><span class="annot"><span class="annottext">a -&gt; [a]
</span><a href="#local-6989586621679518822"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; [a]
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; [a]
</span><a href="#local-6989586621679518822"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [a]) -&gt; ([a] -&gt; a) -&gt; [a] -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; a
forall a. [a] -&gt; a
</span><a href="GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-81"></span><span>               </span><span class="hs-special">[</span><span class="hs-special">]</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-82"></span><span>               </span><span class="hs-special">(</span><span id="local-6989586621679518821"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518821"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518821"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [a]) -&gt; [a]
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. [a] -&gt; [a]
</span><a href="GHC.List.html#tail"><span class="hs-identifier hs-var">tail</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; (a -&gt; [a]) -&gt; a -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a]
</span><a href="#local-6989586621679518822"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-85"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#NonEmpty"><span class="hs-identifier hs-type">NonEmpty</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-86"></span><span>  </span><span id="local-6989586621679518814"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; NonEmpty a) -&gt; NonEmpty a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518813"><span class="annot"><span class="annottext">a -&gt; NonEmpty a
</span><a href="#local-6989586621679518813"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(NonEmpty a -&gt; NonEmpty a) -&gt; NonEmpty a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; NonEmpty a
</span><a href="#local-6989586621679518813"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; NonEmpty a) -&gt; (NonEmpty a -&gt; a) -&gt; NonEmpty a -&gt; NonEmpty a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty a -&gt; a
forall {a}. NonEmpty a -&gt; a
</span><a href="#local-6989586621679518812"><span class="hs-identifier hs-var">neHead</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-87"></span><span>             </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679518811"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518811"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#%3A%7C"><span class="hs-operator hs-type">:|</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518811"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; NonEmpty a
forall a. a -&gt; [a] -&gt; NonEmpty a
</span><a href="GHC.Base.html#%3A%7C"><span class="hs-operator hs-var">:|</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; [a]) -&gt; [a]
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty a -&gt; [a]
forall {a}. NonEmpty a -&gt; [a]
</span><a href="#local-6989586621679518809"><span class="hs-identifier hs-var">neTail</span></a></span><span> </span><span class="annot"><span class="annottext">(NonEmpty a -&gt; [a]) -&gt; (a -&gt; NonEmpty a) -&gt; a -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; NonEmpty a
</span><a href="#local-6989586621679518813"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-88"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-89"></span><span>      </span><span id="local-6989586621679518812"><span class="annot"><span class="annottext">neHead :: NonEmpty a -&gt; a
</span><a href="#local-6989586621679518812"><span class="hs-identifier hs-var hs-var">neHead</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span id="local-6989586621679518808"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518808"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#%3A%7C"><span class="hs-operator hs-type">:|</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518808"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-90"></span><span>      </span><span id="local-6989586621679518809"><span class="annot"><span class="annottext">neTail :: NonEmpty a -&gt; [a]
</span><a href="#local-6989586621679518809"><span class="hs-identifier hs-var hs-var">neTail</span></a></span></span><span> </span><span class="hs-glyph">~</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Base.html#%3A%7C"><span class="hs-operator hs-type">:|</span></a></span><span> </span><span id="local-6989586621679518807"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679518807"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679518807"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-93"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-94"></span><span>    </span><span id="local-6989586621679518801"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; IO a) -&gt; IO a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; IO a) -&gt; IO a
forall a. (a -&gt; IO a) -&gt; IO a
</span><a href="System.IO.html#fixIO"><span class="hs-identifier hs-var">fixIO</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-97"></span><span id="local-6989586621679518966"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-glyph">-&gt;</span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679518966"><span class="hs-identifier hs-type">r</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-98"></span><span>    </span><span id="local-6989586621679518794"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; r -&gt; a) -&gt; r -&gt; a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518793"><span class="annot"><span class="annottext">a -&gt; r -&gt; a
</span><a href="#local-6989586621679518793"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621679518792"><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621679518792"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679518791"><span class="annot"><span class="annottext">a :: a
</span><a href="#local-6989586621679518791"><span class="hs-identifier hs-var hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; r -&gt; a
</span><a href="#local-6989586621679518793"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518791"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">r
</span><a href="#local-6989586621679518792"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679518791"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-comment">-- | @since 4.3.0.0</span><span>
</span><span id="line-101"></span><span id="local-6989586621679518963"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518963"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-102"></span><span>    </span><span id="local-6989586621679518785"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Either e a) -&gt; Either e a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518784"><span class="annot"><span class="annottext">a -&gt; Either e a
</span><a href="#local-6989586621679518784"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679518783"><span class="annot"><span class="annottext">a :: Either e a
</span><a href="#local-6989586621679518783"><span class="hs-identifier hs-var hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Either e a
</span><a href="#local-6989586621679518784"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either e a -&gt; a
forall {a} {b}. Either a b -&gt; b
</span><a href="#local-6989586621679518782"><span class="hs-identifier hs-var">unRight</span></a></span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679518783"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Either e a
</span><a href="#local-6989586621679518783"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-103"></span><span>             </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679518782"><span class="annot"><span class="annottext">unRight :: Either a b -&gt; b
</span><a href="#local-6989586621679518782"><span class="hs-identifier hs-var hs-var">unRight</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679518781"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679518781"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679518781"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-104"></span><span>                   </span><span class="annot"><a href="#local-6989586621679518782"><span class="hs-identifier hs-var">unRight</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; b
forall a. [Char] -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;mfix Either: Left&quot;</span></span></span><span>
</span><span id="line-105"></span><span>
</span><span id="line-106"></span><span class="hs-comment">-- | @since 2.01</span><span>
</span><span id="line-107"></span><span id="local-6989586621679518957"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518957"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-108"></span><span>        </span><span id="local-6989586621679518775"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; ST s a) -&gt; ST s a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a -&gt; ST s a) -&gt; ST s a
forall a s. (a -&gt; ST s a) -&gt; ST s a
</span><a href="Control.Monad.ST.Imp.html#fixST"><span class="hs-identifier hs-var">fixST</span></a></span></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="hs-comment">-- Instances of Data.Monoid wrappers</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-113"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-type">Dual</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-114"></span><span>    </span><span id="local-6989586621679518768"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Dual a) -&gt; Dual a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518767"><span class="annot"><span class="annottext">a -&gt; Dual a
</span><a href="#local-6989586621679518767"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Dual a
forall a. a -&gt; Dual a
</span><a href="Data.Semigroup.Internal.html#Dual"><span class="hs-identifier hs-var">Dual</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Dual a -&gt; a
forall a. Dual a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getDual"><span class="hs-identifier hs-var hs-var">getDual</span></a></span><span> </span><span class="annot"><span class="annottext">(Dual a -&gt; a) -&gt; (a -&gt; Dual a) -&gt; a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Dual a
</span><a href="#local-6989586621679518767"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-117"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier hs-type">Sum</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621679518759"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Sum a) -&gt; Sum a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518758"><span class="annot"><span class="annottext">a -&gt; Sum a
</span><a href="#local-6989586621679518758"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Sum a
forall a. a -&gt; Sum a
</span><a href="Data.Semigroup.Internal.html#Sum"><span class="hs-identifier hs-var">Sum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Sum a -&gt; a
forall a. Sum a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getSum"><span class="hs-identifier hs-var hs-var">getSum</span></a></span><span> </span><span class="annot"><span class="annottext">(Sum a -&gt; a) -&gt; (a -&gt; Sum a) -&gt; a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Sum a
</span><a href="#local-6989586621679518758"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-121"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier hs-type">Product</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-122"></span><span>    </span><span id="local-6989586621679518750"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Product a) -&gt; Product a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518749"><span class="annot"><span class="annottext">a -&gt; Product a
</span><a href="#local-6989586621679518749"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Product a
forall a. a -&gt; Product a
</span><a href="Data.Semigroup.Internal.html#Product"><span class="hs-identifier hs-var">Product</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Product a -&gt; a
forall a. Product a -&gt; a
</span><a href="Data.Semigroup.Internal.html#getProduct"><span class="hs-identifier hs-var hs-var">getProduct</span></a></span><span> </span><span class="annot"><span class="annottext">(Product a -&gt; a) -&gt; (a -&gt; Product a) -&gt; a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Product a
</span><a href="#local-6989586621679518749"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-125"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Monoid.html#First"><span class="hs-identifier hs-type">First</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-126"></span><span>    </span><span id="local-6989586621679518740"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; First a) -&gt; First a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518739"><span class="annot"><span class="annottext">a -&gt; First a
</span><a href="#local-6989586621679518739"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; First a
forall a. Maybe a -&gt; First a
</span><a href="Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; Maybe a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">First a -&gt; Maybe a
forall a. First a -&gt; Maybe a
</span><a href="Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First a -&gt; Maybe a) -&gt; (a -&gt; First a) -&gt; a -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; First a
</span><a href="#local-6989586621679518739"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-129"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Monoid.html#Last"><span class="hs-identifier hs-type">Last</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span id="local-6989586621679518730"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Last a) -&gt; Last a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518729"><span class="annot"><span class="annottext">a -&gt; Last a
</span><a href="#local-6989586621679518729"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; Last a
forall a. Maybe a -&gt; Last a
</span><a href="Data.Monoid.html#Last"><span class="hs-identifier hs-var">Last</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; Maybe a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Last a -&gt; Maybe a
forall a. Last a -&gt; Maybe a
</span><a href="Data.Monoid.html#getLast"><span class="hs-identifier hs-var hs-var">getLast</span></a></span><span> </span><span class="annot"><span class="annottext">(Last a -&gt; Maybe a) -&gt; (a -&gt; Last a) -&gt; a -&gt; Maybe a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Last a
</span><a href="#local-6989586621679518729"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span class="hs-comment">-- | @since 4.8.0.0</span><span>
</span><span id="line-133"></span><span id="local-6989586621679518930"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518930"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-type">Alt</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518930"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-134"></span><span>    </span><span id="local-6989586621679518718"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Alt f a) -&gt; Alt f a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518717"><span class="annot"><span class="annottext">a -&gt; Alt f a
</span><a href="#local-6989586621679518717"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Alt f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Alt f a
</span><a href="Data.Semigroup.Internal.html#Alt"><span class="hs-identifier hs-var">Alt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f a) -&gt; f a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Alt f a -&gt; f a
forall {k} (f :: k -&gt; *) (a :: k). Alt f a -&gt; f a
</span><a href="Data.Semigroup.Internal.html#getAlt"><span class="hs-identifier hs-var hs-var">getAlt</span></a></span><span> </span><span class="annot"><span class="annottext">(Alt f a -&gt; f a) -&gt; (a -&gt; Alt f a) -&gt; a -&gt; f a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Alt f a
</span><a href="#local-6989586621679518717"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span class="hs-comment">-- | @since 4.12.0.0</span><span>
</span><span id="line-137"></span><span id="local-6989586621679518919"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518919"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Monoid.html#Ap"><span class="hs-identifier hs-type">Ap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518919"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-138"></span><span>    </span><span id="local-6989586621679518706"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Ap f a) -&gt; Ap f a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518705"><span class="annot"><span class="annottext">a -&gt; Ap f a
</span><a href="#local-6989586621679518705"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Ap f a
forall {k} (f :: k -&gt; *) (a :: k). f a -&gt; Ap f a
</span><a href="Data.Monoid.html#Ap"><span class="hs-identifier hs-var">Ap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f a) -&gt; f a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Ap f a -&gt; f a
forall {k} (f :: k -&gt; *) (a :: k). Ap f a -&gt; f a
</span><a href="Data.Monoid.html#getAp"><span class="hs-identifier hs-var hs-var">getAp</span></a></span><span> </span><span class="annot"><span class="annottext">(Ap f a -&gt; f a) -&gt; (a -&gt; Ap f a) -&gt; a -&gt; f a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Ap f a
</span><a href="#local-6989586621679518705"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">-- Instances for GHC.Generics</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-142"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#Par1"><span class="hs-identifier hs-type">Par1</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-143"></span><span>    </span><span id="local-6989586621679518697"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Par1 a) -&gt; Par1 a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518696"><span class="annot"><span class="annottext">a -&gt; Par1 a
</span><a href="#local-6989586621679518696"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Par1 a
forall p. p -&gt; Par1 p
</span><a href="GHC.Generics.html#Par1"><span class="hs-identifier hs-var">Par1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Par1 a -&gt; a
forall p. Par1 p -&gt; p
</span><a href="GHC.Generics.html#unPar1"><span class="hs-identifier hs-var hs-var">unPar1</span></a></span><span> </span><span class="annot"><span class="annottext">(Par1 a -&gt; a) -&gt; (a -&gt; Par1 a) -&gt; a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Par1 a
</span><a href="#local-6989586621679518696"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-146"></span><span id="local-6989586621679518906"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518906"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-type">Rec1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518906"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679518685"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Rec1 f a) -&gt; Rec1 f a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518684"><span class="annot"><span class="annottext">a -&gt; Rec1 f a
</span><a href="#local-6989586621679518684"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; Rec1 f a
forall k (f :: k -&gt; *) (p :: k). f p -&gt; Rec1 f p
</span><a href="GHC.Generics.html#Rec1"><span class="hs-identifier hs-var">Rec1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f a) -&gt; f a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rec1 f a -&gt; f a
forall k (f :: k -&gt; *) (p :: k). Rec1 f p -&gt; f p
</span><a href="GHC.Generics.html#unRec1"><span class="hs-identifier hs-var hs-var">unRec1</span></a></span><span> </span><span class="annot"><span class="annottext">(Rec1 f a -&gt; f a) -&gt; (a -&gt; Rec1 f a) -&gt; a -&gt; f a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Rec1 f a
</span><a href="#local-6989586621679518684"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-150"></span><span id="local-6989586621679518889"><span id="local-6989586621679518890"><span id="local-6989586621679518891"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518891"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-type">M1</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518890"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518889"><span class="hs-identifier hs-type">c</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518891"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-151"></span><span>    </span><span id="local-6989586621679518673"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; M1 i c f a) -&gt; M1 i c f a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518672"><span class="annot"><span class="annottext">a -&gt; M1 i c f a
</span><a href="#local-6989586621679518672"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f a -&gt; M1 i c f a
forall k i (c :: Meta) (f :: k -&gt; *) (p :: k). f p -&gt; M1 i c f p
</span><a href="GHC.Generics.html#M1"><span class="hs-identifier hs-var">M1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f a) -&gt; f a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">M1 i c f a -&gt; f a
forall k i (c :: Meta) (f :: k -&gt; *) (p :: k). M1 i c f p -&gt; f p
</span><a href="GHC.Generics.html#unM1"><span class="hs-identifier hs-var hs-var">unM1</span></a></span><span class="annot"><span class="annottext">(M1 i c f a -&gt; f a) -&gt; (a -&gt; M1 i c f a) -&gt; a -&gt; f a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; M1 i c f a
</span><a href="#local-6989586621679518672"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="hs-comment">-- | @since 4.9.0.0</span><span>
</span><span id="line-154"></span><span id="local-6989586621679518872"><span id="local-6989586621679518873"><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518873"><span class="hs-identifier hs-type">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518872"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679518873"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679518872"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621679518658"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; (:*:) f g a) -&gt; (:*:) f g a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518657"><span class="annot"><span class="annottext">a -&gt; (:*:) f g a
</span><a href="#local-6989586621679518657"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; f a) -&gt; f a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(:*:) f g a -&gt; f a
forall {f :: * -&gt; *} {g :: * -&gt; *} {p}. (:*:) f g p -&gt; f p
</span><a href="#local-6989586621679518656"><span class="hs-identifier hs-var">fstP</span></a></span><span> </span><span class="annot"><span class="annottext">((:*:) f g a -&gt; f a) -&gt; (a -&gt; (:*:) f g a) -&gt; a -&gt; f a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; (:*:) f g a
</span><a href="#local-6989586621679518657"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">f a -&gt; g a -&gt; (:*:) f g a
forall k (f :: k -&gt; *) (g :: k -&gt; *) (p :: k).
f p -&gt; g p -&gt; (:*:) f g p
</span><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-var">:*:</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; g a) -&gt; g a
forall (m :: * -&gt; *) a. MonadFix m =&gt; (a -&gt; m a) -&gt; m a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var">mfix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(:*:) f g a -&gt; g a
forall {f :: * -&gt; *} {g :: * -&gt; *} {p}. (:*:) f g p -&gt; g p
</span><a href="#local-6989586621679518654"><span class="hs-identifier hs-var">sndP</span></a></span><span> </span><span class="annot"><span class="annottext">((:*:) f g a -&gt; g a) -&gt; (a -&gt; (:*:) f g a) -&gt; a -&gt; g a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; (:*:) f g a
</span><a href="#local-6989586621679518657"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-157"></span><span>        </span><span id="local-6989586621679518656"><span class="annot"><span class="annottext">fstP :: (:*:) f g p -&gt; f p
</span><a href="#local-6989586621679518656"><span class="hs-identifier hs-var hs-var">fstP</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679518653"><span class="annot"><span class="annottext">f p
</span><a href="#local-6989586621679518653"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span class="annot"><span class="annottext">g p
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">f p
</span><a href="#local-6989586621679518653"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-158"></span><span>        </span><span id="local-6989586621679518654"><span class="annot"><span class="annottext">sndP :: (:*:) f g p -&gt; g p
</span><a href="#local-6989586621679518654"><span class="hs-identifier hs-var hs-var">sndP</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">f p
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Generics.html#%3A%2A%3A"><span class="hs-operator hs-type">:*:</span></a></span><span> </span><span id="local-6989586621679518652"><span class="annot"><span class="annottext">g p
</span><a href="#local-6989586621679518652"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">g p
</span><a href="#local-6989586621679518652"><span class="hs-identifier hs-var">b</span></a></span></span></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-- Instances for Data.Ord</span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="hs-comment">-- | @since 4.12.0.0</span><span>
</span><span id="line-163"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Control.Monad.Fix.html#MonadFix"><span class="hs-identifier hs-type">MonadFix</span></a></span><span> </span><span class="annot"><a href="Data.Ord.html#Down"><span class="hs-identifier hs-type">Down</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-164"></span><span>    </span><span id="local-6989586621679518646"><span class="annot"><span class="annottext">mfix :: forall a. (a -&gt; Down a) -&gt; Down a
</span><a href="Control.Monad.Fix.html#mfix"><span class="hs-identifier hs-var hs-var hs-var hs-var">mfix</span></a></span></span><span> </span><span id="local-6989586621679518645"><span class="annot"><span class="annottext">a -&gt; Down a
</span><a href="#local-6989586621679518645"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Down a
forall a. a -&gt; Down a
</span><a href="Data.Ord.html#Down"><span class="hs-identifier hs-var">Down</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; a) -&gt; a
forall a. (a -&gt; a) -&gt; a
</span><a href="Data.Function.html#fix"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Down a -&gt; a
forall a. Down a -&gt; a
</span><a href="Data.Ord.html#getDown"><span class="hs-identifier hs-var hs-var">getDown</span></a></span><span> </span><span class="annot"><span class="annottext">(Down a -&gt; a) -&gt; (a -&gt; Down a) -&gt; a -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Down a
</span><a href="#local-6989586621679518645"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-165"></span></pre></body></html>